package com.maiji.cloud.response.community;

import com.maiji.cloud.response.login.LocationResDto;
import com.maiji.cloud.response.login.UploadImageResData;
import com.maiji.cloud.response.login.UserInfoResData;
import com.maiji.cloud.utils.ShareInfoEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.util.List;

@NoArgsConstructor
@Data
@Accessors(chain=true)

@ApiModel("ComMsgBaseOutputDto")

public class ComMsgBaseOutputDto {

    @ApiModelProperty(value = "id",required = true)
    private String msgId;

    @ApiModelProperty(value = "用户ID")
    private String userId;

    @ApiModelProperty(value = "标题")
    private String title;

    @ApiModelProperty(value = "文本内容",required = true)
    private String content;

    @ApiModelProperty(value = "类型. 0：文本，1：图片 2：视频 3：文章",required = true)
    private Integer type; //类型. 0：文本，1：图片 2：视频

    @ApiModelProperty(value = "是否展示地理位置。 0：否 1：是",required = true)
    private Boolean showLocation; //是否展示地理位置。 0：否 1：是

    @ApiModelProperty(value = "评论过数量（只增不减，删除评论不影响此值，可以作为评论多页显示的页码）" ,required = true)
    private Integer commented_count; //评论过数量（只增不减，删除评论不影响此值，可以作为评论多页显示的页码）

    @ApiModelProperty(value = "0：普通动态，1：推荐动态，2：精品动态（客服选出），3：案例" ,required = true)
    private Integer priority; //优先级

    @ApiModelProperty(value = "访问量" ,required = true)
    private Integer pu;//访问量

    @ApiModelProperty(value = "点赞量",required = true)
    private Integer praise_count;//点赞

    @ApiModelProperty(value = "转发量",required = true)
    private Integer transmit_count;//转发

    @ApiModelProperty(value = "收藏量",required = true)
    private Integer collect_count;//收藏

    @ApiModelProperty(value = "是否收藏",required = true)
    private Boolean isCollect = false;//是否收藏

    @ApiModelProperty(value = "是否点赞",required = true)
    private Boolean isPraise = false;//是否点赞

    @ApiModelProperty(value = "是否转发得积分",required = true)
    private Boolean canGetIntegral = false;

    @ApiModelProperty("动态的用户信息")
    private UserInfoResData user;

    @ApiModelProperty("图片或者视频地址")
    private List<UploadImageResData> files;

    @ApiModelProperty(value = "位置信息")
    private LocationResDto location;

    @ApiModelProperty(value = "评论列表 列表页面最多返回4条数据，如果返回的数据超过页面渲染的条数 ， 页面剩下显示为更多")
    private List<ComCommentOutputDto> comments;

    @ApiModelProperty(value = "发布时间戳",required = true)
    private Long publishTime;//

    @ApiModelProperty(value = "是否本人所发",required = true)
    private Boolean isOfSelf = false;//是否本人所发

    @ApiModelProperty(value = "是否被删除 0：未被删除 、1：被用户删除 、2、被管理员删除",required = true)
    private Integer delete;//1：被用户删除 、2：被管理员删除

    @ApiModelProperty(value = "内嵌H5")
    private String webUrl;

    @ApiModelProperty(value = "用于分享的H5")
    private String shareUrl;

    @ApiModelProperty(value = "微信小程序页面路径")
    private String miniPage;

    @ApiModelProperty(value = "是否置顶 0:否 1：是")
    private Integer isTop;//是否置顶

    @ApiModelProperty(value = "置顶排序")
    private Integer topSort;//置顶排序

    @ApiModelProperty(value = "at用户列表")
    private List<String> atUserIds;//at用户列表

    @ApiModelProperty(value = "是否转发得积分 0 ：否 1 ：是")
    private Integer isIntegral;

    @ApiModelProperty(value = "是否举报")
    private Integer isReport;

    @ApiModelProperty(value = "举报数量")
    private Integer report_count;

    @ApiModelProperty(value = "标签列表")
    private List<ComLabelOutputDto> labels;


    public String getWebUrl(){
        return ShareInfoEnum.SHARE_COMMUNITY.getWebUrl() + msgId;
    }

    public String getShareUrl() {
        return ShareInfoEnum.SHARE_COMMUNITY.getShareUrl() + msgId;
    }

    public String getMiniPage() {
        return ShareInfoEnum.SHARE_COMMUNITY.getMiniPage() + msgId;
    }
}
